function sampl=quickSort1(sampl,left,right)
    if(left>right)
        return;
    end
    i=left;j=right;
    temp = sampl(i,:);
     
     while(i~=j)
         while(i<j & compare([sampl(j,1) sampl(j,2) temp(1) temp(2)],2)==[sampl(j,1) sampl(j,2)])
             j=j-1;
         end
         sampl(i,:)=sampl(j,:);
         while(i<j & compare([sampl(i,1) sampl(i,2) temp(1) temp(2)],1)==[sampl(j,1) sampl(j,2)])
             i=i+1;
         end
         sampl(j,:)=sampl(i,:);
         
     end
        sampl(j,:) = temp;
        sampl= quickSort1(sampl,left,j-1);
        sampl= quickSort1(sampl,i+1,right);
end

